{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fd82436f-867e-4d8b-a1b0-61f8970b6f99",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "02fcea07-b253-4c17-8134-7cb075bb4980",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training with Adam, lr=0.01, batch_size=256\n",
      "Training with Adam, lr=0.01, batch_size=512\n",
      "Training with Adam, lr=0.01, batch_size=1024\n",
      "Training with Adam, lr=0.001, batch_size=256\n",
      "Training with Adam, lr=0.001, batch_size=512\n",
      "Training with Adam, lr=0.001, batch_size=1024\n",
      "Training with SGD, lr=0.01, batch_size=256\n",
      "Training with SGD, lr=0.01, batch_size=512\n",
      "Training with SGD, lr=0.01, batch_size=1024\n",
      "Training with SGD, lr=0.001, batch_size=256\n",
      "Training with SGD, lr=0.001, batch_size=512\n",
      "Training with SGD, lr=0.001, batch_size=1024\n",
      "Training with RMSprop, lr=0.01, batch_size=256\n",
      "Training with RMSprop, lr=0.01, batch_size=512\n",
      "Training with RMSprop, lr=0.01, batch_size=1024\n",
      "Training with RMSprop, lr=0.001, batch_size=256\n",
      "Training with RMSprop, lr=0.001, batch_size=512\n",
      "Training with RMSprop, lr=0.001, batch_size=1024\n"
     ]
    }
   ],
   "source": [
    "import torch.optim as optim\n",
    "from itertools import product\n",
    "import json\n",
    "\n",
    "optimizers = [{'name': 'Adam', 'object':optim.Adam},\n",
    "              {'name': 'SGD', 'object':optim.SGD},\n",
    "              {'name': 'RMSprop', 'object':optim.RMSprop}\n",
    "              ]\n",
    "              \n",
    "learning_rate = [0.01, 0.001]\n",
    "batch_size = [256, 512, 1024]\n",
    "\n",
    "results = []\n",
    "train_lossess = []\n",
    "test_lossess = []\n",
    "\n",
    "for optim_config, lr, bs in product(optimizers, learning_rate, batch_size):\n",
    "    print(f\"Training with {optim_config['name']}, lr={lr}, batch_size={bs}\")\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ef6f4581-4aef-490b-a02d-54006dd39162",
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'pandas'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[2], line 2\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[38;5;66;03m# 导入相关的库\u001b[39;00m\n\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpd\u001b[39;00m\n\u001b[0;32m      3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[0;32m      4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmatplotlib\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpyplot\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mplt\u001b[39;00m\n",
      "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'pandas'"
     ]
    }
   ],
   "source": [
    "conda"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2fd55cf9-55ad-4486-b050-d0a352328130",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
